package com.cy.server.utils;

import com.cy.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @peoject: yeb
 * @description: 操作员工具类
 * @author: LiShaoZhuo
 * @create: 2021-04-30 16:45
 **/
public class AdminUtils {

    
    /** 
    * @Description: 获取当前登录操作员 
    * @Param:  
    * @return:  
    * @Author: LiShaoZhuo 
    * @Date: 2021/4/30 
    */
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
